Skip to content

test: Normalize the package name in the new deprecation snapshots - #3061

Merged
schochastics merged 3 commits into
mainfrom
test/flavor-neutral-deprecation-snapshots
Dec 4, 2026
Merged

schochastics merged 3 commits into
mainfrom
test/flavor-neutral-deprecation-snapshots

Conversation

@schochastics

Copy link
Copy Markdown
Contributor

Seven deprecation snapshots added recently use plain expect_snapshot():

  • the argument renames: hits_scores(scale =), closeness(vids =), sample_grg(nodes =), degree(v =) and the migration fixture's positional tail;
  • the legacy-matrix warnings of add_edges() and make_graph().

Under a flavor (igraph.dev, see scripts/flavor.sh), lifecycle names the running package, so the message reads "deprecated as of igraph.dev 3.0.0". The recorded "igraph 3.0.0" then doesn't match, and the series' CI failed on all seven.

This switches them to expect_snapshot_igraph(), which normalizes the name, as tests/testthat/helper-snapshot.R asks for any snapshot that names the package. Nothing changes on the mainline: the name is left as is, and these sections have no Source: lines for the helper to scrub, so the snapshots stay byte-identical (the six test files pass with no .new.md).

A sweep of every _snaps/*.md section whose output names the package found no other plain expect_snapshot() left.

🤖 Generated with Claude Code

schochastics and others added 3 commits December 4, 2026 10:01
The deprecation snapshots added with the argument renames and the
legacy-matrix warnings went through expect_snapshot(), so under a flavor
lifecycle names the package "igraph.dev" and the recorded "igraph" no longer
matches. Route them through expect_snapshot_igraph(), which normalizes the
name (tests/testthat/helper-snapshot.R). On the mainline the name is left as
is, and these sections carry no file paths for the helper to scrub, so their
snapshots stay byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schochastics
schochastics enabled auto-merge (squash) December 4, 2026 09:36
auto-merge was automatically disabled December 4, 2026 10:00

Repository rule violations found

@schochastics
schochastics merged commit d0fd2c1 into main Dec 4, 2026
9 checks passed
@schochastics
schochastics deleted the test/flavor-neutral-deprecation-snapshots branch December 4, 2026 10:18
schochastics added a commit to schochastics/rigraph that referenced this pull request Dec 4, 2026
…raph#3061)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: schochastics <schochastics@users.noreply.github.com>

(cherry picked from commit d0fd2c1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant